package com.qf.pojo;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/**
 * @author 高圆圆
 * @date 2023/6/6 16:52
 * 订单实体
 */
public class Order {
    /**
     * oid  varchar(32) NOT NULL
     * ordertime    datetime NULL
     * total    double NULL
     * state    int(11) NULL
     * address  varchar(30) NULL
     * name varchar(20) NULL
     * telephone    varchar(20) NULL
     * uid  varchar(32) NULL
     */
    private String oid  ;    //订单编号
    private Date ordertime ; //下单时间
    private double total ;  // 总金额
    private int   state  ;  //订单状态 :默认0,未支付,1,已支付
    private String address ; //收货地址
    private  String name   ;//收货人
    private String telephone ; //手机号
    private User User ;  //属于哪个用户的

    //一个订单包含多个订单项
    private List<OrderItem> items = new LinkedList<>() ;



    public Order() {
    }

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public User getUser() {
        return User;
    }

    public void setUser(com.qf.pojo.User user) {
        User = user;
    }

    public List<OrderItem> getItems() {
        return items;
    }

    public void setItems(List<OrderItem> items) {
        this.items = items;
    }
}
